package myApp.mobile;

import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import myApp.classi.Connection;

public class Valid extends ListActivity
{
  static Connection a;

  public static String[] fillList(String paramString)
  {
    return a.getValid2(paramString).split("!i!");
  }

  public void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    a = new Connection();
    String str = "wrong";
    try
    {
      File localFile = Environment.getExternalStorageDirectory();
      if (localFile.canWrite())
      {
        BufferedReader localBufferedReader = new BufferedReader(new FileReader(new File(localFile, "mBusData.txt")));
        str = localBufferedReader.readLine();
        str = str.split("!i!")[0];
        localBufferedReader.close();
      }
      setListAdapter(new ArrayAdapter(this, 2130903041, fillList(str)));
      ListView localListView = getListView();
      localListView.setTextFilterEnabled(true);
      localListView.setOnItemClickListener(new Valid.1(this));
      return;
    }
    catch (IOException localIOException)
    {
      while (true)
        Log.e("SD", "Could not read file " + localIOException.getMessage());
    }
  }

  public boolean onCreateOptionsMenu(Menu paramMenu)
  {
    super.onCreateOptionsMenu(paramMenu);
    getMenuInflater().inflate(2131099648, paramMenu);
    return true;
  }

  public boolean onOptionsItemSelected(MenuItem paramMenuItem)
  {
    switch (paramMenuItem.getItemId())
    {
    default:
    case 2131165221:
    case 2131165222:
    case 2131165223:
    }
    while (true)
    {
      return true;
      Intent localIntent3 = new Intent();
      localIntent3.setClass(this, Home.class);
      startActivity(localIntent3);
      continue;
      Intent localIntent2 = new Intent();
      localIntent2.setClass(this, Ppage.class);
      startActivity(localIntent2);
      continue;
      Intent localIntent1 = new Intent();
      localIntent1.setClass(this, Option.class);
      startActivity(localIntent1);
    }
  }
}

/* Location:           C:\Users\Spider22\Desktop\TesiMBUS\classes_dex2jar.jar
 * Qualified Name:     myApp.mobile.Valid
 * JD-Core Version:    0.6.1
 */